\hypertarget{class_state_machine_service}{\section{State\-Machine\-Service Class Reference}
\label{class_state_machine_service}\index{State\-Machine\-Service@{State\-Machine\-Service}}
}


{\ttfamily \#include $<$State\-Machine\-Service.\-hpp$>$}

Inheritance diagram for State\-Machine\-Service\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{class_state_machine_service}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_state_machine_service_ab079df23c6e018fb3d0539feb1f2384b}{State\-Machine\-Service} (bool deactivate\-On\-Finish=true)
\item 
virtual \hyperlink{class_state_machine_service_ad8f5dc988067126557bd637fd427854f}{$\sim$\-State\-Machine\-Service} ()
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{class_state_machine_service_a6e7af5b0fc9d30b04427de599c82c902}{Initialize} ()
\item 
virtual void \hyperlink{class_state_machine_service_a146fcaefa174e2ba1fc0a0b2c04ae64d}{Handle\-Start} ()
\item 
virtual void \hyperlink{class_state_machine_service_a6d449ca476108879d39c457f6ed0c443}{Handle\-Periodic} ()
\item 
virtual void \hyperlink{class_state_machine_service_a07943aa3a165302bdff082711aeaf7ff}{Handle\-Continuous} ()
\item 
\hyperlink{class_state}{State} \& \hyperlink{class_state_machine_service_a58a0820b5ae80d15bc05e4cb591878b5}{Get\-Initial\-State} ()
\item 
void \hyperlink{class_state_machine_service_a042d44513ac6f3e378f71d1fa96e68d0}{Set\-Initial\-State} (\hyperlink{class_state}{State} \&state)
\item 
\hyperlink{class_state}{State} \& \hyperlink{class_state_machine_service_ae0f3d418ffb272a376d6d4e70bae9b71}{Get\-Final\-State} ()
\item 
void \hyperlink{class_state_machine_service_ac7a1ccbdbadaf5b317048e8552c8a3b1}{Own\-State} (\hyperlink{class_state}{State} \&state)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The State\-Machine\-Controller class uses a state machine system to control the robot.

To use it, create subclasses that override the Initialize. In Initialize, add the States and trasitions to those States.

This class is currently broken. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_state_machine_service_ab079df23c6e018fb3d0539feb1f2384b}{\index{State\-Machine\-Service@{State\-Machine\-Service}!State\-Machine\-Service@{State\-Machine\-Service}}
\index{State\-Machine\-Service@{State\-Machine\-Service}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{State\-Machine\-Service}]{\setlength{\rightskip}{0pt plus 5cm}State\-Machine\-Service\-::\-State\-Machine\-Service (
\begin{DoxyParamCaption}
\item[{bool}]{deactivate\-On\-Finish = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{class_state_machine_service_ab079df23c6e018fb3d0539feb1f2384b}
Constructor for State\-Machine\-Controller. \hypertarget{class_state_machine_service_ad8f5dc988067126557bd637fd427854f}{\index{State\-Machine\-Service@{State\-Machine\-Service}!$\sim$\-State\-Machine\-Service@{$\sim$\-State\-Machine\-Service}}
\index{$\sim$\-State\-Machine\-Service@{$\sim$\-State\-Machine\-Service}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{$\sim$\-State\-Machine\-Service}]{\setlength{\rightskip}{0pt plus 5cm}State\-Machine\-Service\-::$\sim$\-State\-Machine\-Service (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_state_machine_service_ad8f5dc988067126557bd637fd427854f}
Destructor for State\-Machine\-Controller. 

\subsection{Member Function Documentation}
\hypertarget{class_state_machine_service_ae0f3d418ffb272a376d6d4e70bae9b71}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Get\-Final\-State@{Get\-Final\-State}}
\index{Get\-Final\-State@{Get\-Final\-State}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Get\-Final\-State}]{\setlength{\rightskip}{0pt plus 5cm}{\bf State} \& State\-Machine\-Service\-::\-Get\-Final\-State (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_state_machine_service_ae0f3d418ffb272a376d6d4e70bae9b71}
Gets the final \hyperlink{class_state}{State}.

When the final \hyperlink{class_state}{State} runs, the state machine is finished.

\begin{DoxyReturn}{Returns}
The final \hyperlink{class_state}{State}. 
\end{DoxyReturn}
\hypertarget{class_state_machine_service_a58a0820b5ae80d15bc05e4cb591878b5}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Get\-Initial\-State@{Get\-Initial\-State}}
\index{Get\-Initial\-State@{Get\-Initial\-State}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Get\-Initial\-State}]{\setlength{\rightskip}{0pt plus 5cm}{\bf State} \& State\-Machine\-Service\-::\-Get\-Initial\-State (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_state_machine_service_a58a0820b5ae80d15bc05e4cb591878b5}
Gets the very first \hyperlink{class_state}{State} that runs.

\begin{DoxyReturn}{Returns}
The very first \hyperlink{class_state}{State} that runs. 
\end{DoxyReturn}
\hypertarget{class_state_machine_service_a07943aa3a165302bdff082711aeaf7ff}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Handle\-Continuous@{Handle\-Continuous}}
\index{Handle\-Continuous@{Handle\-Continuous}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Handle\-Continuous}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Handle\-Continuous (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_state_machine_service_a07943aa3a165302bdff082711aeaf7ff}
Overriders of this function should call this implimentation.

You can do this by calling \char`\"{}\-State\-Machine\-Controller\-::\-Handle\-Continuous\char`\"{}. \hypertarget{class_state_machine_service_a6d449ca476108879d39c457f6ed0c443}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Handle\-Periodic@{Handle\-Periodic}}
\index{Handle\-Periodic@{Handle\-Periodic}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Handle\-Periodic}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Handle\-Periodic (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_state_machine_service_a6d449ca476108879d39c457f6ed0c443}
Overriders of this function should call this implimentation.

You can do this by calling \char`\"{}\-State\-Machine\-Controller\-::\-Handle\-Periodic\char`\"{}. 

Reimplemented from \hyperlink{class_service_a9604d04295202019e9a15f8c93bb31c6}{Service}.

\hypertarget{class_state_machine_service_a146fcaefa174e2ba1fc0a0b2c04ae64d}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Handle\-Start@{Handle\-Start}}
\index{Handle\-Start@{Handle\-Start}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Handle\-Start}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Handle\-Start (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_state_machine_service_a146fcaefa174e2ba1fc0a0b2c04ae64d}
Do not override this function.

Override Initialize instead. 

Reimplemented from \hyperlink{class_service_a37c9e32f9044122d3a6d2ab40fc17c39}{Service}.

\hypertarget{class_state_machine_service_a6e7af5b0fc9d30b04427de599c82c902}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Initialize}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Initialize (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_state_machine_service_a6e7af5b0fc9d30b04427de599c82c902}
Override this function to add the States and trasitions to those States. \hypertarget{class_state_machine_service_ac7a1ccbdbadaf5b317048e8552c8a3b1}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Own\-State@{Own\-State}}
\index{Own\-State@{Own\-State}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Own\-State}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Own\-State (
\begin{DoxyParamCaption}
\item[{{\bf State} \&}]{state}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_state_machine_service_ac7a1ccbdbadaf5b317048e8552c8a3b1}
Gives the State\-Machine\-Controller ownership of the specified \hyperlink{class_state}{State}, thereby relieving the user of the need to delete it.


\begin{DoxyParams}{Parameters}
{\em state} & The \hyperlink{class_state}{State} to be placed under owener of the State\-Machine\-Controller. Behaviour is only defined if the state is dynamically allocated (e.\-g. \char`\"{}new State()\char`\"{}). \\
\hline
\end{DoxyParams}
\hypertarget{class_state_machine_service_a042d44513ac6f3e378f71d1fa96e68d0}{\index{State\-Machine\-Service@{State\-Machine\-Service}!Set\-Initial\-State@{Set\-Initial\-State}}
\index{Set\-Initial\-State@{Set\-Initial\-State}!StateMachineService@{State\-Machine\-Service}}
\subsubsection[{Set\-Initial\-State}]{\setlength{\rightskip}{0pt plus 5cm}void State\-Machine\-Service\-::\-Set\-Initial\-State (
\begin{DoxyParamCaption}
\item[{{\bf State} \&}]{state}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_state_machine_service_a042d44513ac6f3e378f71d1fa96e68d0}
Sets the very first \hyperlink{class_state}{State} that runs.


\begin{DoxyParams}{Parameters}
{\em state} & The desired \hyperlink{class_state}{State} to run first. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/\-Services/State\-Machine\-Service.\-hpp\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/\-Services/State\-Machine\-Service.\-cpp\end{DoxyCompactItemize}
